/**********************************************************
** Replication file for Ban, Palmer and Schneer 2019     **
** file: analyze_lobbyists.do                            **
** date: 5/29/2019                                       **
**********************************************************/

*ssc install scheme_tufte

***House and Senate
set scheme tufte

clear all
set more off

*set working dir

cd "/nfs/home/B/bschneer/shared_space/bschneer/lobbying_replication"

*load data
use "usr_gen/lobby_outcomes_v3_all", clear

*label outcomes
label var amount "Lobbyist Total Revenues ({c \$|})"
label var amount_per_lobbyist "Revenues per Lobbyist ({c \$|})"
label var amount_weighted_lim "LVA Weighted Revenues ({c \$|})"
label var fe_lim "LVA, Revenues Per Client/Year ({c \$|})"
label var fe "LVA, Revenues Per Client/Year (Negative Values Allowed) ({c \$|})"

label var amount_cy "Lobbyist Revenues per Client/Year ({c \$|})"
label var amount_per_lobbyist_cy "Revenues per Lobbyist per Client/Year ({c \$|})"

label var amount_weighted_lim_yrly "LVA Weighted Revenues per Year ({c \$|})"
label var amount_per_lobbyist_yrly "Revenues per Lobbyist per Year ({c \$|})"
label var amount_yrly "Lobbyist Total Revenues per Year ({c \$|})"


replace amount_weighted_lim=0 if amount_weighted_lim==.

*save temporary file to load for different analyses

tempfile analyze

save `analyze',replace

/**********************************************
*Create Descriptive Statistics Summary Table***
**********************************************/

gen lobbying_reports_yrly =  lobbying_reports/n_years
gen n = 1

gen rdl = (sen|house|staffer)

tempfile t0 t1 t2

save `t0', replace

collapse  (mean) lobbying_reports_yrly amount_per_lobbyist_yrly amount_weighted_lim_yrly  (sum) n 
gen all = 1

save `t1', replace

use `t0', clear
collapse  (mean) lobbying_reports_yrly amount_per_lobbyist_yrly amount_weighted_lim_yrly  (sum) n , by(rdl)
save `t2', replace

use `t1', clear
append using `t2'

gsort all -rdl

drop all rdl

xpose, clear

export delimited using "out/table1.csv", replace

/***************************************************************
*Generate plots of CDFs for house, senate, staffers and others**
***************************************************************/

use `analyze', clear

foreach var of varlist amount_weighted_lim_yrly fe_lim  {
use `analyze', clear

cumul `var' if house==1, gen(c1) 
cumul `var' if sen==1, gen(c2) 
cumul `var' if house==0 & sen==0 & staffer ==0, gen(c5) 
cumul `var' if staffer==1 & house==0 & sen==0, gen(c6) 
cumul `var' if congress_current==1 & house==0 & sen==0, gen(c7)


sum `var' if c1!=. | c2!=.
local xmax = 1.5*`r(max)'

graph twoway (line c1 `var' if c1!=., sort lcolor(red) lpattern(dash)) ///
			(line c2 `var' if c2!=., sort lcolor(blue) lpattern(tight_dot)) ///
			(line c6 `var' if c6!=., sort lcolor(green) lpattern(dot)) ///
			(line c5 `var' if c5!=., sort lpattern(solid)) if `var' < `xmax', ///
			 legend(order(1 "Former Rep." 2 "Former Sen." 3 "Former Staff" 4 "All Other Lobbyists") rows(1) size(small)) ///
			 xtitle(, size(small))  ytitle(ECDF, size(small)) ///
			 xlabel(,labsize(small)) ylabel(,labsize(small)) ///
			 title("Distribution of Lobbyists", size(small)) ///
			 scheme(tufte)

graph export "out/cdf_`var'_1.pdf", replace


/***************************************************************
*Create and export plots tracking Rainmakers                   *
*(i.e., high performing lobbyists)                             *
***************************************************************/

	egen rank_aapy_S = rank(`var') if sen==1 
	sum rank_aapy_S
	replace rank_aapy_S = r(max)-rank_aapy_S+1
	label var rank_aapy_S "Senators"

	egen rank_aapy_H = rank(`var') if house==1 
	sum rank_aapy_H
	replace rank_aapy_H = r(max)-rank_aapy_H+1
	label var rank_aapy_H "Representatives"

	egen rank_aapy_O = rank(`var') if staffer==1
	sum rank_aapy_O
	replace rank_aapy_O = r(max)-rank_aapy_O+1
	label var rank_aapy_O "Staffers"

	egen rank_aapy_L = rank(`var') if house==0 & sen==0 & staffer ==0
	sum rank_aapy_L
	replace rank_aapy_L = r(max)-rank_aapy_L+1
	label var rank_aapy_L "Other Lobbyists"

	
	gen mc_label = substr(lobbyist, 1, strpos(lobbyist, ",")-1)
		local cutoff = 15
		
	
		
	foreach k in "S" "H" "O" "L"{
	local lab: variable label rank_aapy_`k'
	
	
	if "`var'" == "amount_weighted_lim_yrly" & ("`k'" == "S" | "`k'"=="H"){

	graph twoway (scatter rank_aapy_`k' `var' if rank_aapy_`k' <= `cutoff' & rank_aapy_`k'>=3, ///
					mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall)) ///
					(scatter rank_aapy_`k' `var' if rank_aapy_`k' < 3, ///
					mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(9)), ///
		yscale(reverse range(1/`cutoff')) ylabel(0(5)`cutoff',labsize(small)) ///
		xscale(range(0 5000000)) xlabel(0(1000000)5000000, labsize(small)) ///
		xtitle(, size(small))  ytitle("Rank", size(small)) ///
		 xlabel(,labsize(small)) ///
		title("Top `cutoff' `lab'", size(small)) legend(off) ///
		scheme(tufte)
	
	}
	else {
	
	graph twoway (scatter rank_aapy_`k' `var' if rank_aapy_`k' <= `cutoff' & rank_aapy_`k'>=3, ///
					mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall)) ///
					(scatter rank_aapy_`k' `var' if rank_aapy_`k' < 3, ///
					mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(9)), ///
		yscale(reverse range(1/`cutoff')) ylabel(0(5)`cutoff',labsize(small)) ///
		xtitle(, size(small))  ytitle("Rank", size(small)) ///
	 xlabel(,labsize(small)) ///
		title("Top `cutoff' `lab'", size(small)) legend(off) ///
		scheme(tufte)
}		
		
	graph export "out/top_lobby_`var'_`k'.pdf", replace
}
}


/***************************************************************
*Scatterplot showing value added versus traditional averages  **
***************************************************************/

twoway (scatter fe_lim amount_per_lobbyist_cy if sen==1) ///
(scatteri 0 0 500000 500000, recast(line)), legend(off) ///
ytitle("Lobbyist Value Added, Revenues Per Client/Year ({c \$|})",size(medium)) xtitle("Revenues per Lobbyist per Client/Year ({c \$|})",size(medium)) xlabel(,labsize(medsmall)) ylabel(,labsize(medsmall)) ///
scheme(tufte) //title("Comparison of Lobbying Measures, Senators") 
graph export "out/scatter_sens.pdf", replace

twoway (scatter fe_lim amount_per_lobbyist_cy if house==1) ///
(scatteri 0 0 500000 500000, recast(line)), legend(off) ///
ytitle("Lobbyist Value Added, Revenues Per Client/Year ({c \$|})",size(medium)) xtitle("Revenues per Lobbyist per Client/Year ({c \$|})",size(medium)) xlabel(,labsize(medsmall)) ylabel(,labsize(medsmall)) ///
scheme(tufte) //title("Comparison of Lobbying Measures, House") 
graph export "out/scatter_house.pdf", replace

twoway (scatter fe_lim amount_per_lobbyist_cy if house==0 & sen==0 & staffer==0) ///
(scatteri 0 0 2000000 2000000, recast(line)), legend(off) ///
ytitle("Lobbyist Value Added, Revenues Per Client/Year ({c \$|})",size(medium)) xtitle("Revenues per Lobbyist per Client/Year ({c \$|})",size(medium)) xlabel(,labsize(medsmall)) ylabel(,labsize(medsmall)) ///
scheme(tufte) //title("Comparison of Lobbying Measures, All Others")  
graph export "out/scatter_others.pdf", replace

twoway (scatter fe_lim amount_per_lobbyist_cy if staffer==1 & house==0 & sen==0) ///
(scatteri 0 0 500000 500000, recast(line)), legend(off) ///
ytitle("Lobbyist Value Added, Revenues Per Client/Year ({c \$|})",size(medium)) xtitle("Revenues per Lobbyist per Client/Year ({c \$|})",size(medium)) xlabel(,labsize(medsmall)) ylabel(,labsize(medsmall)) ///
scheme(tufte) //title("Comparison of Lobbying Measures, Staffers") 
graph export "out/scatter_staff.pdf", replace

*Plot showing Pct Change in old vs new measures

gen pctgap = 100 * (fe_lim - amount_per_lobbyist_cy) / amount_per_lobbyist_cy
gen gap = fe_lim - amount_per_lobbyist_cy

	egen rank_change_S = rank(pctgap) if sen==1, unique
	sum rank_change_S
	replace rank_change_S = r(max)-rank_change_S+1
	label var rank_change_S "Senators"
	
	egen rank_change_abs_S = rank(gap) if sen==1, unique
	sum rank_change_abs_S
	replace rank_change_abs_S = r(max)-rank_change_abs_S+1 
	label var rank_change_abs_S "Change in Rank"
	
	egen rank_change_H = rank(pctgap) if house==1, unique
	sum rank_change_H
	replace rank_change_H = r(max)-rank_change_H+1
	label var rank_change_H "House"
	
	egen rank_change_abs_H = rank(gap) if house==1, unique
	sum rank_change_abs_H
	replace rank_change_abs_H = r(max)-rank_change_abs_H+1 
	label var rank_change_abs_H "Change in Rank"
	
	egen rank_change = rank(pctgap), unique
	sum rank_change
	replace rank_change = r(max)-rank_change+1
	label var rank_change "Change in Rank"
	
	egen rank_change_abs = rank(gap), unique
	sum rank_change_abs
	replace rank_change_abs = r(max)-rank_change_abs+1 
	label var rank_change_abs "Change in Rank"
	
	egen rank_change_O = rank(pctgap) if house==0 & sen==0 & staffer==1, unique
	sum rank_change_O
	replace rank_change_O = r(max)-rank_change_O+1
	label var rank_change_O "Change in Rank"
		

label var pctgap "\% Change in Earnings, Per Client/Year"
graph twoway (scatter rank_change_S pctgap if rank_change_S <29, ///
						mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(9)) ///
				(scatter rank_change_S pctgap  if rank_change_S >=29 & rank_change_S < 35, ///
						mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(3)), ///			
yscale(reverse) ylabel(,labsize(small)) ///
xtitle(, size(small))  ytitle("Rank", size(small)) scheme(tufte) legend(off) 
//title("Change in Senators", size(small)) 
graph export "out/rank_change_S.pdf", replace
		

label var gap "Adjustment In Value Added, Per Client/Year ({c \$|})"
label var pctgap "% Change in Earnings, Per Client/Year"
graph twoway (scatter rank_change_H pctgap if rank_change_H ==1, ///
								mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(9)) ///
							  (scatter rank_change_H pctgap if rank_change_H <40 & rank_change_H >1, ///
							   								mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(3)), ///
					yscale(reverse) ylabel(,labsize(small)) ///
					xtitle(, size(small))  ytitle("Rank", size(small)) ///
					 xlabel(,labsize(small)) legend(off) ///
					scheme(tufte)
graph export "out/rank_change_H_hi.pdf", replace
		

label var gap "Adjustment In Value Added, Per Client/Year ({c \$|})"


graph twoway (scatter rank_change_abs_H gap if rank_change_abs_H >150 & rank_change_abs_H <180, ///
											mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(9)), ///
											yscale(reverse) ylabel(,labsize(small)) ///
											xtitle(, size(small))  ytitle("Rank", size(small)) ///
											 xlabel(,labsize(small)) legend(off) ///
											scheme(tufte)
											graph export "out/rank_change_abs_H_lo.pdf", replace


graph twoway (scatter rank_change_H pctgap if rank_change_H >140 & rank_change_H < 180, ///
mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(3)) ///
(scatter rank_change_H pctgap  if rank_change_H >130 & rank_change_H <= 140, ///
mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(9)), ///			
yscale(reverse) ylabel(,labsize(small)) ///
xtitle(, size(small))  ytitle("Rank", size(tiny)) legend(off) scheme(tufte)
graph export "out/rank_change_H_lo.pdf", replace

label var pctgap "\% Change in Earnings, Per Client/Year"
graph twoway (scatter rank_change_O pctgap if rank_change_O <40 & rank_change_O>1, sort ///
						mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(3)) ///
						(scatter rank_change_O pctgap if rank_change_O ==1, sort ///
												mcolor(blue) msymbol(circ) mlabel(lobbyist) mlabsize(vsmall) mlabposition(9)), ///							
						yscale(reverse) ylabel(,labsize(small)) ///
						xtitle(, size(small))  ytitle("Rank", size(small)) ///
						 xlabel(,labsize(small)) legend(off) ///
						scheme(tufte)
graph export "out/rank_change_O_hi.pdf", replace

	
	
	

/********************************************************************
*Descriptive Regressions studying relationship between background  **
*and lobbying outcomes                                             **
********************************************************************/

*label relevant variables

label var sen "Senator"
label var house "House"
label var staffer "Staffer"

label var fe_lim "Lobbyist Value Added"
label var amount_per_lobbyist_cy "Earnings Per Lobbyist"


label var amount "Lobbyist Total Revenues ({c \$|})"
label var amount_per_lobbyist "Revenues per Lobbyist ({c \$|})"
label var amount_weighted_lim "Lobbyist Weighted Revenues ({c \$|})"
label var fe_lim "Lobbyist Value Added, Revenues Per Client/Year ({c \$|})"
label var fe "Lobbyist Value Added, Revenues Per Client/Year (Negative Values Allowed) ({c \$|})"

label var amount_cy "Lobbyist Revenues per Client/Year ({c \$|})"
label var amount_per_lobbyist_cy "Revenues per Lobbyist per Client/Year ({c \$|})"

label var amount_weighted_lim_yrly "Lobbyist Weighted Revenues per Year ({c \$|})"
label var amount_per_lobbyist_yrly "Revenues per Lobbyist per Year ({c \$|})"
label var amount_yrly "Lobbyist Total Revenues per Year ({c \$|})"

*create additional outcomes, covariates
gen ln_lobbying_reports = log(lobbying_reports+1)

gen rev_door = (sen | house | staffer)

gen mc = (sen|house)

gen ln_amount_per_lobbyist = log(amount_per_lobbyist+1)

gen ln_amount_weighted_lim = log(amount_weighted_lim+1)

*label them
label var ln_lobbying_reports "\shortstack{log(Lobbying\\ Reports)}"

label var rev_door "Rev. Door Lobbyist"

label var mc "Former MC"

label var staffer "Former Staffer"

label var ln_amount_per_lobbyist "\shortstack{log(Rev. \\per Person)}"

label var ln_amount_weighted_lim "\shortstack{log(LVA\\ Wtd Rev.)}"


*Identify rainmakers -- top 10 pct of lobbyists

_pctile amount_weighted_lim_yrly, p(90)

gen rainmaker = (amount_weighted_lim_yrly>`r(r1)' & amount_weighted_lim_yrly < .)
label var rainmaker "Rainmaker"

*recalculate percent difference between old and new variable for alternatve measure of LVA

drop pctgap
gen pctgap = 100 * (amount_weighted_lim - amount_per_lobbyist) / amount_per_lobbyist
label var pctgap "\shortstack{\% $\Delta$ \\ in Earnings}"

*Regressions
reg ln_lobbying_reports sen house staffer, robust
estimates store reg0

reg ln_amount_per_lobbyist sen house staffer, robust
estimates store reg1

reg ln_amount_weighted_lim sen house staffer, robust
estimates store reg2

reg pctgap sen house staffer, robust
estimates store reg3

reg rainmaker sen house staffer, robust
estimates store reg4

*Output to table
esttab  reg1 reg2 reg3 reg4 reg0 using "out/desc_reg_lobby_ln.tex", star(* 0.10 ** 0.05 *** 0.01) r2 se label compress nonotes ///
title("Lobbyist Value Added and Working in Politics \label{regdesc1}") ///
addnotes("Robust standard errors are in parentheses." "* p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01") replace


/********************************************************************
*Descriptive Regressions: Lobbying and Uncertainty                 **
*and lobbying outcomes                                             **
********************************************************************/

*Load data

use "usr_gen/lobby_outcomes_v3_50", clear
*Create Hi EPU indicator
gen epu_hi = !inlist(period,1,3,5)

*label variables
label var amount "Lobbyist Total Revenues ({c \$|})"
label var amount_per_lobbyist "Revenues per Lobbyist ({c \$|})"
label var amount_weighted_lim "Lobbyist Weighted Revenues ({c \$|})"
label var fe_lim "Lobbyist Value Added, Revenues Per Client/Year ({c \$|})"
label var fe "Lobbyist Value Added, Revenues Per Client/Year (Negative Values Allowed) ({c \$|})"

label var amount_cy "Lobbyist Revenues per Client/Year ({c \$|})"
label var amount_per_lobbyist_cy "Revenues per Lobbyist per Client/Year ({c \$|})"

label var amount_weighted_lim_yrly "Lobbyist Weighted Revenues per Year ({c \$|})"
label var amount_per_lobbyist_yrly "Revenues per Lobbyist per Year ({c \$|})"
label var amount_yrly "Lobbyist Total Revenues per Year ({c \$|})"

*create relevant outcomes, covariates, etc.

gen ln_lobbying_reports = log(lobbying_reports+1)

gen rev_door = (sen | house | staffer)

gen mc = (sen|house)

gen ln_amount_per_lobbyist = log(amount_per_lobbyist+1)

gen ln_amount_weighted_lim = log(amount_weighted_lim+1)

*label them
label var epu_hi "Policy Uncertainty"

label var ln_lobbying_reports "log(Lobbying Reports)"

label var rev_door "Rev. Door Lobbyist"

label var mc "Former MC"

label var staffer "Former Staffer"

label var ln_amount_per_lobbyist "log(Rev. per Lobbyist)"

label var ln_amount_weighted_lim "log(LVA Wtd. Rev.)"


*Regressions
reg ln_lobbying_reports i.rev_door##i.epu_hi, robust
estimates store regb1

reg ln_amount_weighted_lim i.rev_door##i.epu_hi, robust
estimates store regb2

reg ln_amount_per_lobbyist i.rev_door##i.epu_hi, robust
estimates store regb3


reg ln_lobbying_reports i.mc##i.epu_hi, robust
estimates store regb4

reg ln_amount_weighted_lim i.mc##i.epu_hi, robust
estimates store regb5

reg ln_amount_per_lobbyist i.mc##i.epu_hi, robust
estimates store regb6


reg ln_lobbying_reports i.staffer##i.epu_hi, robust
estimates store regb7

reg ln_amount_weighted_lim i.staffer##i.epu_hi, robust
estimates store regb8

reg ln_amount_per_lobbyist i.staffer##i.epu_hi, robust
estimates store regb9

*Output to table
esttab regb1 regb4 regb7 regb3 regb6 regb9 regb2 regb5 regb8  using "out/reg_uncertainty.tex", star(* 0.10 ** 0.05 *** 0.01) r2 se label compress nonotes ///
title("Lobbyist Value Added and Policy Uncertainty \label{regdesc2}") nobaselevels order(1.epu_hi 1.rev_door 1.mc 1.staffer ) ///
coeflabels(1.epu_hi "Policy Uncertainty" 1.rev_door "Rev. Door Lobbyist" 1.mc "Former MC" 1.staffer "Former Staff" 1.rev_door#1.epu_hi "Rev. Door $\times$ Uncertainty" 1.mc#1.epu_hi "MC $\times$ Uncertainty" 1.staffer#1.epu_hi "Staff $\times$ Uncertainty" _cons "Constant") ///
mgroups("log(Lobbying Reports)" "log(Revenues per Lobbyist)" "log(Lobbyist Weighted Revenues)", pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
addnotes("Robust standard errors are in parentheses." "* p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01") nomtitles substitute({table} {sidewaystable}) replace




*Regressions
reg ln_lobbying_reports i.rev_door##i.epu_hi i.period, robust
estimates store regb1

reg ln_amount_weighted_lim i.rev_door##i.epu_hi i.period, robust
estimates store regb2

reg ln_amount_per_lobbyist i.rev_door##i.epu_hi i.period, robust
estimates store regb3


reg ln_lobbying_reports i.mc##i.epu_hi i.period, robust
estimates store regb4

reg ln_amount_weighted_lim i.mc##i.epu_hi i.period, robust
estimates store regb5

reg ln_amount_per_lobbyist i.mc##i.epu_hi i.period, robust
estimates store regb6


reg ln_lobbying_reports i.staffer##i.epu_hi i.period, robust
estimates store regb7

reg ln_amount_weighted_lim i.staffer##i.epu_hi i.period, robust
estimates store regb8

reg ln_amount_per_lobbyist i.staffer##i.epu_hi i.period, robust
estimates store regb9

*Output to table
esttab regb1 regb4 regb7 regb3 regb6 regb9 regb2 regb5 regb8  using "out/reg_uncertainty_pd.tex", star(* 0.10 ** 0.05 *** 0.01) r2 se label compress nonotes ///
title("Lobbyist Value Added and Policy Uncertainty \label{regdesc2}") nobaselevels order(1.epu_hi 1.rev_door 1.mc 1.staffer ) ///
coeflabels(1.epu_hi "Policy Uncertainty" 1.rev_door "Rev. Door Lobbyist" 1.mc "Former MC" 1.staffer "Former Staff" 1.rev_door#1.epu_hi "Rev. Door $\times$ Uncertainty" 1.mc#1.epu_hi "MC $\times$ Uncertainty" 1.staffer#1.epu_hi "Staff $\times$ Uncertainty" _cons "Constant") ///
mgroups("log(Lobbying Reports)" "log(Revenues per Lobbyist)" "log(Lobbyist Weighted Revenues)", pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
indicate("Time Period Dummy = *period") ///
addnotes("Robust standard errors are in parentheses." "* p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01") nomtitles substitute({table} {sidewaystable}) replace



/********************************************************************
*Comparison of alternate estimation procedures                     **
********************************************************************/

*load LVA data calculated when including additional covariates in estimation procedure

import delimited using "usr_gen/lobbyist_final_all_covs.csv", clear

keep lobbyist_id felim

rename felim felim_covs

tempfile temp1

save `temp1', replace

*Load orig data
import delimited using "usr_gen/lobbyist_final_all.csv", clear

keep lobbyist_id felim

*merge two data sources together
merge 1:1 lobbyist_id using `temp1'

*create figure comparing estimates
twoway (scatter felim felim_covs) ///
(scatteri 0 0 2000000 2000000, recast(line)), legend(off) ///
ytitle("LVA w/ Covariates",size(medium)) xtitle("LVA",size(medium)) xlabel(,labsize(medsmall)) ylabel(,labsize(medsmall)) ///
scheme(tufte) 
graph export "out/scatter_lva.pdf", replace

corr felim felim_covs



